/**************************************************************************

    SlkError.h

    Version 7.50

    This file contains the public declarations.

    Copyright (c) 2002-2014  SLK Systems, all rights reserved.
    
**************************************************************************/

#ifndef _ERROR_H
#define _ERROR_H

#include "SlkConstants.h"
#include "SlkToken.h"

#define PRIVATE static
#define PUBLIC
#define INSTANCE_METHOD static

#undef  SELF    
#define SELF    struct _error

typedef struct _error
{
    peeker_t  *peeker;

    slk_size_t  (*mismatch) ( SELF *id, slk_size_t symbol, slk_size_t token );
    slk_size_t  (*no_entry) ( SELF *id, slk_size_t symbol, slk_size_t token, int level );
    void        (*input_left) ( SELF *id );
    void        (*message ) ( SELF *id, char  *message );

} error_t, SlkError;

#define mismatch(self,a,b)      (*self).mismatch(self,a,b)
#define no_entry(self,a,b,c)    (*self).no_entry(self,a,b,c)
#define input_left(self)        (*self).input_left(self)
#define message(self,a)         (*self).message(self,a)

PUBLIC
void
InitializeError ( error_t   *error,
                  peeker_t  *peeker ); 

#endif
